﻿@model S4Store.Models.TelSaleReport.CarBrandHistoryModel
@{
    Layout = null;
    ViewBag.Title = "CarBrandHistory";

    S4Store.Models.Chart.Line ChartModel1 = new S4Store.Models.Chart.Line();
    ChartModel1.Name = "12小时电话回复率";
    ChartModel1.YAxis = "比率(%)";

    S4Store.Models.Chart.ChartSeries series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标回复率";
    S4Store.Models.Chart.ChartSeries series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际回复率";
    ChartModel1.Serieses.Add(series1);
    ChartModel1.Serieses.Add(series2);
    foreach(var report in Model.Reports){
        series1.Data.Add(report.Standard.H12DHHFLV);
        series2.Data.Add(report.H12DHHFLV);
    }    
    for(DateTime dt=Model.Start;dt<=Model.End;dt=dt.AddMonths(1)){
        ChartModel1.XAxis.Add(dt.ToString("M月"));
    }
    ChartModel1.Colors = new List<string> { S4Store.Models.Chart.Color.Green, S4Store.Models.Chart.Color.Blue };




    S4Store.Models.Chart.Line ChartModel2 = new S4Store.Models.Chart.Line();
    ChartModel2.Name = "线上客户转化率";
    ChartModel2.YAxis = "比率(%)";
    series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标转化率";
    series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际转化率";
    ChartModel2.Serieses.Add(series1);
    ChartModel2.Serieses.Add(series2);
    foreach (var report in Model.Reports)
    {
        series1.Data.Add(report.Standard.XSKHZHLV);
        series2.Data.Add(report.XSKHZHLV);
    }   
    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel2.XAxis.Add(dt.ToString("M月"));
    }

    ChartModel2.Colors = new List<string> { S4Store.Models.Chart.Color.Green, S4Store.Models.Chart.Color.Blue };


    S4Store.Models.Chart.Line ChartModel3 = new S4Store.Models.Chart.Line();
    ChartModel3.Name = "电话销售数";
    ChartModel3.YAxis = "数量";
    ChartModel3.IsRate = false;
    series1 = new S4Store.Models.Chart.ChartSeries();
    series1.Name = "目标销售数";
    series2 = new S4Store.Models.Chart.ChartSeries();
    series2.Name = "实际销售数";
    ChartModel3.Serieses.Add(series1);
    ChartModel3.Serieses.Add(series2);
    foreach (var report in Model.Reports)
    {
        series1.Data.Add(report.MonthConfig.DHXSMB);
        series2.Data.Add(report.JCS);
    }   
    for (DateTime dt = Model.Start; dt <= Model.End; dt = dt.AddMonths(1))
    {
        ChartModel3.XAxis.Add(dt.ToString("M月"));
    }
    ChartModel3.Colors = new List<string> { S4Store.Models.Chart.Color.Green, S4Store.Models.Chart.Color.Blue };


}
<div style="height:100%; width:100%; overflow:auto">
@Html.Action("ReportBar", "Common", Model.BarModel)
<div class="pageContent">
	
	<div class="tabs" currentIndex="0" eventType="click">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>12小时电话回复率</span></a></li>
					<li><a href="javascript:;"><span>线上客户转化率</span></a></li>
					<li><a href="javascript:;"><span>电话销售数</span></a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent" >
			<div>
            @Html.Partial("../Chart/Line", ChartModel1)
			</div>
			<div>
            @Html.Partial("../Chart/Line", ChartModel2)
			</div>
            <div>
            @Html.Partial("../Chart/Line", ChartModel3)
			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>

</div>